home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Celestin Apprentice 5
/
Apprentice-Release5.iso
/
Source Code
/
C
/
Applications
/
Python 1.3.3
/
Python 133 SRC
/
Demo
/
tkinter
/
guido
/
hello.py
< prev
next >
Wrap
Text File
|
1995-12-21
|
304b
|
18 lines
# Display hello, world in a button; clicking it quits the program
import sys
from Tkinter import *
def main():
root = Tk()
button = Button(root)
button['text'] = 'Hello, world'
button['command'] = quit_callback # See below
button.pack()
root.mainloop()
def quit_callback():
sys.exit(0)
main()